package com.idc.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GoController {

    @PreAuthorize("hasAuthority('go')")
    @GetMapping("/say")
    public String say(){

        return "say you lala~~";
    }

    @PreAuthorize("hasAuthority('run')")
    @GetMapping("/dance")
    public String dance(){

        return "say you dance~~";
    }

    @PreAuthorize("hasAuthority('hi')")
    @GetMapping("/jump")
    public String jump(){

        return "say you jump~~";
    }
}
